﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Ranji_2017_Umlite
{
    public partial class Zongmao : Form
    {
        public Zongmao()
        {
            InitializeComponent();
        }

        private void Zongmao_Load(object sender, EventArgs e)
        {
            Set_page(1);
        }

        private void zongmao_component1_Load(object sender, EventArgs e)
        {

        }


        // 用来设置页数
        private void Set_page(int page_num)
        {
            zongmao_component1.Set_machine_num((page_num - 1) * 8 + 1);
            zongmao_component2.Set_machine_num((page_num - 1) * 8 + 2);
            zongmao_component3.Set_machine_num((page_num - 1) * 8 + 3);
            zongmao_component4.Set_machine_num((page_num - 1) * 8 + 4);
            zongmao_component5.Set_machine_num((page_num - 1) * 8 + 5);
            zongmao_component6.Set_machine_num((page_num - 1) * 8 + 6);
            zongmao_component7.Set_machine_num((page_num - 1) * 8 + 7);
            zongmao_component8.Set_machine_num((page_num - 1) * 8 + 8);
        }

        private void button_select_1_8_Click(object sender, EventArgs e)
        {
            Set_page(1);
        }

        private void button_select_9_16_Click(object sender, EventArgs e)
        {
            Set_page(2);
        }

        private void button_select_17_24_Click(object sender, EventArgs e)
        {
            Set_page(3);
        }

        private void button_select_32_Click(object sender, EventArgs e)
        {
            Set_page(4);
        }
    }
}
